package daily.aug0813;

import java.io.File;

public class FileMethod_Get {
    public static void main(String[] args) {
        File file = new File("D:\\Development\\eclipse\\eclipse.exe");
        System.out.println("文件名:"+file.getName());
        System.out.println("文件路径:"+file.getAbsolutePath());
        System.out.println("路径名:"+file.getPath());
        System.out.println("文件大小:"+file.length()+"字节");
    }
}
//输出结果：
//文件名:eclipse.exe
//文件路径:D:\Development\eclipse\eclipse.exe
//路径名:D:\Development\eclipse\eclipse.exe
//文件大小:425984字节